<template>
    <div>
        <h1>用户列表</h1>
        <MyTable :tableData="list" :columns="dynamicColumns"></MyTable>
    </div>
</template>

<script setup>
import { computed, onMounted } from 'vue';
import MyTable from '../component/table.vue';
import { useCounterStore } from '../stores/counter'
const store = useCounterStore()
// 在组件加载时获取数据
onMounted(() => {
    store.getList();
});

const list = computed(() => store.list);

</script>

<style lang="scss" scoped></style>